package com.yanqu.road.server.cmd.activity.langyamemorial;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.LangYaMemorialProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.langyamemorial.CrossLangYaMemorialMgr;
import com.yanqu.road.server.manager.activity.langyamemorial.LangYaMemorialActivity;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_LANGYA_MEMORIAL_ATTIC_GET, desc = "阁子列表")
public class CrossLangYaMemorialAtticListCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        LangYaMemorialProto.CrossLangYaMemorialAtticListReqMsg reqMsg = LangYaMemorialProto.CrossLangYaMemorialAtticListReqMsg.parseFrom(packet.getBytes());
        int activityId = reqMsg.getActivityId();

        LangYaMemorialActivity activity = CrossLangYaMemorialMgr.getLangYaMemorialActivity(activityId);
        if(activity != null){
            activity.getAtticList(serverId, packet.getPlayerId(), reqMsg.getPage(), reqMsg.getPageSize());
        }
    }

    @Override
    public void sendData() {

    }
}
